package com.ror.java.se.data.type;

public class Demo01NumericTypes {
    public static void main(String[] args) {
        Test01_LfAndByte();
        Test02_PrintSizes();
    }

    public static void Test01_LfAndByte() {
        long n = 100_0000_0000_0000_0001L;
        float m = 1.000_0001F;
        byte a = 127;
        System.out.println(n);
        System.out.println(m);
        System.out.println(a);
    }

    public static void Test02_PrintSizes() {
        System.out.println(
                "byte: " + Byte.SIZE / 8 + // byte\in[(-128)-127]
                        "\t\tshort: " + Short.SIZE / 8 + // short\in[(-322768)-32767]
                        "\tint: " + Integer.SIZE / 8 +
                        "\nlong: " + Long.SIZE / 8 +
                        "\t\tfloat: " + Float.SIZE / 8 +
                        "\tdouble: " + Double.SIZE / 8 +
                        "\tchar: " + Character.SIZE / 8 // char=ushort\in[0-65535]
        );
    }
}
